home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
freq_qa
/
offlnfaq.zip
/
YARNUQWK.TXT
< prev
Wrap
Internet Message Format
|
1994-06-12
|
25KB
From: samik@uta.fi (Sami K|ykk{)
Newsgroups: news.software.readers,alt.usenet.offline-reader,comp.os.msdos.mail-news
Subject: INFO: How to use uqwk & yarn.
Date: 10 May 1994 16:47:20 +0300
Organization: University of Tampere, Finland
Lines: 187
Message-ID: <2qo398INN4le@kielo.uta.fi>
Reply-To: samik@kaktus.uta.fi
NNTP-Posting-Host: kalliokielo.uta.fi
Xref: rtp.vnet.net news.software.readers:8571 alt.usenet.offline-reader:2505 comp.os.msdos.mail-news:1570
X-Status: R
I've written a small manual about reading the news offline with uqwk
and yarn.
This file is public domain. You can add it to FAQ's, give it to your
friends interestered in offline reading etc. Just keep the author
information in the text.
This text is also available via WWW and Gopher. With WWW, use URL:
http://www.uta.fi/manuals/offline.html
With Gopher, use bookmark:
Type=0+
Name=Offline reader's manual
Path=0/information_in_english/Documents/uqwk.english
Host=gopher.uta.fi
Port=70
Feel free to link this text into your own servers.
Here comes the manual:
How do I read news and mail on my PC, offline?
----------------------------------------------
Examples for uqwk and Yarn
by Sami Koykka 1994
samik@kaktus.uta.fi
Software authors (big thanks to them!)
uqwk: Steve Belczyk (seb3@gte.com)
Yarn: Chin Huang (cthuang@io.org)
This message was written with a notebook computer on a living room
sofa using Yarn version 0.58. It was delivered to you by uqwk version
1.8.
If you don't want to keep your phone line busy, if you want to make
your phone bill smaller or you don't have a modem, but you still want
to read news and mail at home taking your time, this manual is for
you.
You need an Unix account, some experience in using Unix and MS-DOS (or
a personal guru), a PC and disk space. If you don't have a modem, you
will need a way to move files from your Unix account to your PC. For
example, I use diskettes.
Setup
=====
Ftp yourself the latest copy of the Yarn newsreader. You will also
need to get the pkzip/pkunzip package for your PC if you don't already
have it. On your Unix account, you will need uqwk, zip and unzip
commands.
You can find the latest version of uqwk at ftp.gte.com:/pub/uqwk/
The latest version of Yarn is at oak.oakland.edu:/pub/msdos/offline/
The zip for unix is at ftp.uu.net:/pub/archiving/zip/
The pkzip package for pc is at garbo.uwasa.fi:/pc/arcers/
You can find those packets at other sites, also; search with archie.
*** NOTE: Do NOT run uqwk to check whether your system has uqwk;
instead, enter 'which uqwk'. If the command 'which' doesn't work, try
command 'uqwk +r'.
If you type 'uqwk' without any parameters, you will lose your
mail. Actually, you will move all your mail from the mailbox into a
QWK packet, which is almost as bad (unless you know how to use QWK
readers).
If your account doesn't already have uqwk, compile it (read the
documentation and change the parameters in uqwk.h if necessary). Also
compile zip and unzip if your system don't have them. If you don't
know how to compile programs, please ask your system administrator or
a personal guru.
Download Yarn to your PC. Install Yarn following the documentation.
Don't forget to edit the configure file! Download and install pkzip
and pkunzip if you have managed to live without them this far.
Collecting news
===============
Make sure you have enough disk space for news in your PC and enough
quota on yor account. A couple of megabytes should be enough.
Collect news and/or mail with one of the following commands:
uqwk -m +n +L
uqwk +m +n +L
uqwk +m -n +L
The first one collects only unread news and no mail. Second collects
both unread news and all mail. Third one collects only your e-mail.
(Technical info: +L stands for SOUP format)
*** Note that uqwk deletes all collected mail from your mailbox (if
you use +m) and marks newsgroups as read (if you use +n)! If you don't
want them deleted, add the parameter +r to the uqwk command line, or
read (in the uqwk manual) how to collect only certain newsgroups and
certain mail folders.
Uqwk stops collecting when it has collected 0.5 megabytes of news, and
leaves the rest as unread. If you want to collect all the unread news
there is, add parameter -B0 to the uqwk command line. Uqwk always
collects all the mail you have.
Note that all the unread news can make a very big packet, especially
if you subscribe to binaries newsgroups. You can tell uqwk excatly how
much news you want to collect; read the manual page for more
information.
After uqwk has finished, there are lots of small files in your
directory. Don't worry; those will disappear after packing.
Packing news
============
Pack collected news using command:
zip -mk news.zip *.MSG AREAS
The resulting file news.zip is your SOUP-format news packet (you can
use a different name, if you want). Download it to your PC. After
downloading, delete the news.zip file from your Unix account since you
need it only on PC.
Reading news
============
In your PC, let Yarn process your news packet using command line:
IMPORT NEWS.ZIP
After the import has finished, read the news using Yarn. If you don't
see any newsgroups in Yarn, try subscribing to some using the Ins
key. When you have read all news, run expire. Expire will delete all
news which have been on your hard drive long enough. "Long enough" is
one of the things you decide while installing Yarn.
Sending replies
===============
If you have made follow-up posts or sent mail, you need to upload the
reply packet to your Unix machine for sending. If you forgot where the
reply packet is, check the Yarn configuration. You should've told Yarn
the location of the packet when installing. After uploading, delete
the reply packet from the PC. You only need it on Unix.
In the Unix system, unzip the reply packet (for example, replies.zip)
using the command:
unzip -U replies.zip
Two or three files will result. Delete the reply packet (replies.zip)
after unzipping, since you don't need it anymore.
Feed the replies to uqwk:
uqwk -m -n +L -RREPLIES
If you want to collect more news with the same command, change the -m
and -n parameters, or go to the beginning of this manual.
That's it! For more information and hints read the uqwk man page and
Yarn documentation.
Have fun,
Sami
Changes:
========
13.4.1994
- Some syntax corrections. Thanks to Dick Miller (dmiller@im.lcs.mit.edu)!
5.4.1994
- HTML version made available via WWW in URL
http://www.uta.fi/manuals/offline.html
15.3.1994
- Added help for those who don't have 'which' in their system.
- In "collecting all the news", parameter -L0 was wrong. The correct
parameter is -B0. Also, the -B only affects collection of news, not
mail.
- Added the locations for software mentioned and credits for authors.
- Changed layout.
--
Sami K|ykk{ +----------------------------+
samik@kaktus.uta.fi ! couch potato !
http://www.uta.fi/~samik/samik.html +----------------------------+
ⁿ1Path: rtp.vnet.net!news.sprintlink.net!qns1.qns.com!constellation!osuunx.ucc.okstate.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!crcnis1.unl.edu!wupost!gumby!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!not-for-mail
From: cannon@panix.com (Kevin Martin)
Newsgroups: alt.usenet.offline-reader
Subject: How-to for uqwk & yarn
Date: 26 May 1994 14:01:28 -0400
Organization: Brass Cannon Consulting
Lines: 409
Message-ID: <lZDvjqtC8Si8064yn@panix.com>
NNTP-Posting-Host: panix.com
Summary: Terminal emulator script, Unix script, DOS BAT file
Keywords: Yarn uqwk sample
X-Status: R
Sorry for the length of this, but it's all plaintext; zipping and
uuencoding it seems to defeat the purpose of making it accessible
to beginners, yes?
YARN AND UQWK -- A Hands-On Guide by Kevin Martin (cannon@panix.com)
Attached are three separate sample files that work together to create
a complete end-to-end DOS/Windows offline news and mail system. You
will need to customize each file to make the system work with your Usenet
provider.
The three parts are:
(1) A PROCOMM PLUS FOR WINDOWS SCRIPT (SOUP.WAS) that logs on to
a service and automates the uploading of reply packets. Automating
the process cuts down on the chance of human error; the script is
somewhat overwritten because it is meant to run unattended.
When "compiled," the .WAS file will create a .WAX file. I'm using
Procomm's default directory names, but check yours.
This is the LEAST important part of the system -- if you're not
using Procomm Plus for Windows, use this script as a checklist.
You can still enter the important commands at the keyboard.
(2) A UNIX SCRIPT ($HOME/bin/soup -- lowercase, no file extension)
to run uqwk and its support programs (zip, unzip, sz, rz). I assume
all these programs are available on your Unix host and located in
a directory found on your PATH. (As in DOS, the Unix PATH is a string
that lists the directories where executable programs can be found.)
(3) A DOS .BAT FILE (SOUP.BAT) to run the Yarn program on your
PC. Note that this can be associated with a Windows 3.1 icon!
Yarn runs very well under Windows, and if you press ALT-Enter to
make it a windowed session rather than full-screen, you can even
use the Windows Clipboard!
Here's a Windows trick: In your WINDOWS\SYSTEM.INI file, under the
[NonWindowsApp] section, add the line CommandEnvSize to give your
DOS sessions extra environment space:
[NonWindowsApp]
CommandEnvSize=400
Now you will be able to run SOUP.BAT under Windows, and you don't
have to define the Yarn environment variables in AUTOEXEC.BAT.
I have two Windows icons set up -- one invokes Procomm Plus with
the compiled SOUP script:
Command: C:\PROWIN\PW.EXE C:\PROWIN\ASPECT\SOUP.WAX
Double-clicking this icon logs me on, uploads my replies, downloads
any new mail and news, and logs me off. The other icon runs SOUP.BAT
which imports the new download, runs Yarn, and expires the old news
when I exit. It doesn't get much simpler than that!
You will also need YARN (0.64 recommended), some kind of DOS text
editor (I like TED 3.0), and PKzip/PKunzip. READ THE YARN.DOC FILE
THAT COMES WITH YARN!
Each script/batch file has comments to explain what is going on.
The different types of comment lines are:
; = Procomm Aspect language # = Unix REM = DOS
You may need to use the Unix flip utility on the Unix script to strip
off the trailing DOS carriage return (^M) bytes. ("flip -u soup")
Good luck and good reading!
! cut here -------------------------------
; PART 1 of 3 - THIS IS A PROCOMM PLUS FOR WINDOWS "ASPECT" SCRIPT
; It is run on your (Windows) PC and requires Datastorm's Procomm
; Plus for Windows.
proc main
; This script has three main steps:
; (1) Log on to the service provider...
call log_us_in
; (2) Run the Unix script from the command line...
call soup
; (3) Log off and close the Procomm window.
call log_us_off
endproc
proc log_us_in
; Procomm Plus comes with a tool to generate a dial-in script.
; I have NOT taken full advantage of that in this example.
;
; Send the dial string, wait up to 45 seconds for the modem
; to recognize the connection.
transmit "ATDT5551212^M"
waitfor "CONNECT" 45
if FAILURE
errormsg "Couldn't connect!"
transmit "+++ATH"
exit
endif
; This part is dependent on the specific service provider:
waitfor "hich service, please?^M^J"
transmit "panix^M"
waitfor ": " 6
if failure
hangup
usermsg "Panix is not up?!?"
endif
; Userid and password are in the Procomm "Dialing Directory"...
transmit $USERID
transmit "^M"
waitfor ":" 6
if failure
hangup
usermsg "Panix is not up?!?"
endif
transmit $PASSWORD
transmit "^M"
; I've "taught" Panix what terminal type to use; you may need to
; restore the next four lines by removing the semicolons:
;
; waitfor "(vt100) " 4
; if success
; transmit "^M"
; endif
;
; Look for the command line prompt -- I don't depend on the first
; letter always staying the same case:
waitfor "anix%" 3
if failure
call motdkill
endif
endproc
proc motdkill
; Oh, yeah - if the Message of the Day is more than one screen,
; we have to hit the spacebar to continue.
integer k = 0
kill_motd:
if k > 3
transmit "^M"
k = 0
endif
waitfor "anix%" 2
if failure
transmit " "
k = k + 1
goto kill_motd
endif
endproc
proc soup
string pac = "c:\prowin\dnload\newsfile.zip"
string rep = "c:\prowin\upload\panix.rep"
string sav = "c:\prowin\dnload\panix.xxx"
string tmp
integer status
integer i=0
string a
; IMPORTANT! sz WILL NOT OVERLAY AN EXISTING FILE!
; DO THIS TEST TO BE SURE OF GETTING YOUR NEW DOWNLOAD!
; Put away unread packet file, if any...
isfile pac
if success
; usermsg "Saved an unread packet as panix.xxx"
rename pac sav
endif
; Process pending reply, if any...
isfile rep
if success
transmit "rz^M"
pause 1
sendfile zmodem rep
status=$FILEXFER
while status==1
status=$FILEXFER
endwhile
if status==2
delfile rep
endif
pause 1
; ** SEE NOTE! **
; transmit "soup^M"
endif
; -----------------------------------------------------------
; NOTE: This is the setup to use if you are in the habit of
; reading and replying immediately, and you do not want to
; pick up the few stray messages that have arrived in the
; meantime. If you want to run once a day, then REMOVE THE
; LEADING ";" from the transmit line above. That way you
; will post your replies to yesterday's mail and news, and
; pick up today's packet with just one phone call.
; -----------------------------------------------------------
; If you want to use trnkill, here's where you invoke it (I
; installed it in my bin directory, same as the soup script):
transmit "trnkill^M"
; Do the next line unconditionally:
transmit "soup^M"
; Wait up to ten minutes for the Zmodem download to finish:
when filexfer call file_proc
waitfor "Done!!!" 600
endit:
waitfor "anix%" 4
if failure
transmit "^M"
goto endit
endif
endproc
proc file_proc
; This continues to wait if the download is still going on --
; although ten minutes is a LONG time at 14,400!
integer status
status=$FILEXFER
while status==1
status=$FILEXFER
endwhile
endproc
proc log_us_off
; Ctrl-D = Unix logoff; "exit^M" works, too
transmit "^D"
pause 2
;
; Protect us if the Panix terminal server fails to drop carrier --
; the phone company keeps billing unless SOMEONE hangs up!
;
waitfor "NO CARRIER" 8
if failure
transmit "+++"
transmit "ATH^M"
pause 2
endif
;
; Optional: Close the Procomm window. (I do this because I have
; a scheduler waiting to start up another communications program.)
;
closepw
endproc
; END OF PROCOMM SCRIPT
! cut here --------------------------------------
# PART 2 OF 3 - THIS IS A UNIX SCRIPT TO BE RUN ON YOUR HOST
# soup - Unix zsh script file to process HDPF/SOUP packets;
# for use with the YARN offline newsreader
#----
# cannon@panix.com (KM) last mod: 5/26/94
#----
# Note the following assumptions!
#
# (1) You have set up an (empty) "ntmp" directory directly under
# your login (HOME) directory, in which it is OK to do "rm *" -
# don't keep anything there you don't want to lose! For example,
# if "Host% " is your interactive command line prompt:
#
# Host% cd
# Host% mkdir ntmp
# Host% chmod 700 ntmp
#
# (2) You have a current .newsrc file (from running rn or trn
# interactively) in your HOME directory, which uqwk can update.
#
# (3) Files used:
# newsfile.zip = Mail and News from panix created by this script
# panix.rep = Replies to panix, uploaded to my $HOME directory
# by the comm program script (soup.wax) on my PC
#
# (4) How to install the soup script:
# Make a bin directory under your $HOME and install this script
# (lowercase "soup", no extension) there. You must make it
# executable by changing its "mode" with chmod:
#
# Host% cp soup bin
# Host% chmod 700 bin/soup
#
# You also need to add the bin directory to your PATH by doing
# something like the below -- otherwise you'll get a "File not
# found" message when you try to run it. Ask a local guru
# for help making this change permanent (you'll have to find and
# edit the correct "login" script for your account -- .profile,
# .cshrc, .zlogin, etc....):
#
# Host% set PATH=$PATH:$HOME/bin
# Host% export PATH
#
# Okay, enough preliminaries! Here's the script:
#----
# Set uqwk parameters:
#
# Update the .newsrc and empty the mail spool -- you may want
# to set this to 1 until you are confident everything works!
UQ_READ_ONLY=0
#
UQ_HOME_DIR=$HOME/ntmp
UQ_NRC_FILE=$HOME/.newsrc
#
# Set up for SOUP mode, same as +L command line switch:
UQ_HDPF_MODE=1
#
# Honor cross-references:
UQ_XRF_MODE=1
#
# No limit on the packet size:
UQ_MAX_BLKS=0
export UQ_READ_ONLY UQ_HOME_DIR UQ_NRC_FILE
export UQ_HDPF_MODE UQ_XRF_MODE UQ_MAX_BLKS
# Stop the "You have mail" notifier:
biff n
# Make sure we're where we're supposed to be on the disk:
cd
cd ntmp
# Check for existence of a newsfile.zip file:
if [ -f "newsfile.zip" ]
then
# A previous download run failed? recover it:
echo Warning - found an unsent newsfile.zip file
sz -bnu newsfile.zip && rm - *
echo All Done!!!
exit
fi
# This version will EITHER post replies OR download a new
# packet of news and mail -- just run it twice if you want
# to do both....
rm - *
if [ -f "$HOME/panix.rep" ]
then
echo Found reply packet...
mv $HOME/panix.rep $HOME/ntmp/replyfile.zip
unzip -U replyfile && rm replyfile.zip
if [ -f "REPLIES" ]
then
echo Processing reply packet...
uqwk -m -n -RREPLIES
rm *
fi
else
echo Gathering news and mail...
uqwk +m +n
zip newsfile *
sz -bnu newsfile.zip && rm *
fi
cd
# The PC script looks for this message to know we're done:
echo All Done!!!
# Tell biff to go back to work:
biff y
#
# end of soup script
#
! cut here -------------------------------
REM PART 3 of 3 - THIS IS SOUP.BAT, a DOS "wrapper" for YARN 0.64
REM IMPORTANT -- Don't call it YARN.BAT, because that will conflict
REM with YARN.EXE ! (It's a DOS thing....)
@echo off
REM -----
REM This is %0.BAT which invokes the Yarn reader on your PC
ECHO Read the Yarn documentation before you try to use %0 !
ECHO You have to EDIT this file to set the correct value for HOME,
ECHO and you must create/edit your %HOME%\CONFIG. file.
EXIT
REM Remove everything between the ----- lines once you have
REM configured this file properly. It WILL NOT RUN until you do!
REM -----
REM Replace "cannon" with your username:
set home=c:\cannon
REM This is a default value:
set yarn=c:\yarn
REM This is a Procomm default value - replace with your actual
REM download directory and filename:
set packet=c:\prowin\dnload\newsfile.zip
REM Next line is optional and requires the ANSI.SYS driver in
REM your CONFIG.SYS:
REM mode con lines=43
REM Log on to correct drive and directory:
c:
cd %yarn%
if exist %packet% import %packet%
yarn
expire
REM You may optionally use the -r option to delete ALL messages
REM that have been read:
REM expire -r
REM END OF SOUP.BAT
! cut here ----------------------------------------------
END OF SAMPLE FILES.
Permission is granted to Chin Huang to use, modify and/or distribute
any of the above information in any future Yarn distribution, if and
as he deems it suitable. KM 5/26/94
--
cannon@panix.com <Kevin Martin> --- Brass Cannon Consulting
╟Path: rtp.vnet.net!ankh.iia.org!babbage.ece.uc.edu!news.kei.com!sol.ctr.columbia.edu!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!not-for-mail
From: cannon@panix.com (Kevin Martin)
Newsgroups: alt.usenet.offline-reader
Subject: Re: How-to for uqwk & yarn (additions and questions)
Date: 28 May 1994 06:47:52 -0400
Organization: Brass Cannon Consulting
Lines: 109
Message-ID: <M6evjqtC88t3064yn@panix.com>
References: <lZDvjqtC8Si8064yn@panix.com> <jGJvju2nwqEB065yn@login.dkuug.dk>
NNTP-Posting-Host: panix.com
X-Status: R
In article <jGJvju2nwqEB065yn@login.dkuug.dk>, Henrik Roseno wrote:
> In article <lZDvjqtC8Si8064yn@panix.com>, Kevin Martin wrote:
> > You will also need YARN (0.64 recommended), [...]
>
> What's the problem with v0.65 ?
Haven't tried it. :-) I'm willing to state in public that I haven't
had any problems with 0.64, though.
>
> > You may need to use the Unix flip utility on the Unix script to strip
> ^
> before uploading it
Eh? I was thinking you would edit it on your DOS PC, upload it, then
flip it.... But then again, if you "sz" it TO your host from your PC,
that may also have the same effect as flip -- end-of-line conversion
is a switchable Zmodem feature, I believe. If you're reading this using
trn and editing it on your Unix host, though, never mind.
>
> I would like a Telix-script instead...
By all means please share it with the group when you write it. ;-)
> > UQ_READ_ONLY=0
> >
> > export UQ_READ_ONLY
>
> The above isn't necesary. Instead use the command line options when
> calling uqwk.
>
I "inherited" this approach from another fellow who prefered to define
ALL the uqwk variables in his .profile (!) No accounting for tastes....
>
> I use these 2 small scripts, one for sending and one for receiving
> messages:
>
> #!/bin/sh
> rz
> unzip -oU upload.zip
> uqwk -m -n +L -RREPLIES
> rm upload.zip
>
> #!/bin/sh
> if [ -f "offline.zip" ]
> then
> echo Warning - found an unsent offline.zip file!
> sz -u offline.zip
> fi
> uqwk +m +n +x +L -Nuqwknewsrc
> zip -mk9 offline AREAS *.MSG
> sz -u offline.zip
>
> I don't need a separate directory for this, it's all happening in my
> $HOME directory.
Nice scripts! When I started with qwk, I felt safer using a directory
where I was free to "rm *"; just another question of style. (Note: the
zip -m and sz -u command options have similar effects; they remove
the input files once they've served their purpose. They're somewhat
cleaner and perhaps less dangerous than my explicit rm command. See
my most recent tale of woe at the end of this posting.)
(Sidebar: The syntax "rm - *" in mine is a holdover from when I was
still using qwk -- it will remove files such as "-001.ndx", which uqwk
creates if you send it a SUBSCRIBE message in qwk mode. That leading
hyphen caused some of us Unix virgins a bit of tsuris, Steve!)
> From the DOS batch file:
> > expire
> > REM You may optionally use the -r option to delete ALL messages
> > REM that have been read:
> > REM expire -r
>
> Isn't it supposed to delete ONLY messages that have been read...?
> Or is that a matter of words ?
I'm not sure; I'm in the habit of reading or junking EVERYTHING daily,
so "expire -r" would leave me with NOTHING in my newsbase. I prefer
to let things expire in three days so I'll have a bit of context.
I know I'm still learning... for instance, I lost a packet Thursday
morning because my routine was disrupted. I normally copy my packet
to a portable machine and then import it both there and on my desktop.
But I didn't read in the Wednesday packet on my desktop after copying
it.
That shouldn't hurt -- you can see the code in my Procomm script to
handle that, by renaming the file away? But I had moved some directories
around and never recreated the target directory used by that rename.
Now, Zmodem does not like to send a file if there is already (or still)
one by the same name on my PC. The "sz file && rm *" syntax is only
supposed to do the "rm *" if the "sz file" is successful -- but it's not
foolproof. It did the remove anyway, and my packet went bye-bye.
What's the best solution? Maybe I should adopt the syntax you're using.
Or do the cleanup from the Procomm script instead of the Unix script,
since it can confirm on the PC that I've truly received the file!
Thanks for contributing, Henrik.
--
cannon@panix.com <Kevin Martin> --- Brass Cannon Consulting